<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="style/authority/basic_layout.css" rel="stylesheet" type="text/css">
	<link href="style/authority/common_style.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
    
    
    <title>商品查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
 	 <form name="form1" action="servlet/Newgoodsservlet?type=Query" method="post">
	  	<div id="container">	
			<div class="ui_content">
				<div class="ui_text_indent">
					<div id="box_border">
						<div id="box_top">商品查询</div>
						<div id="box_center" >
							商品一级分类<input class="ui_input_txt02" name="name1" id="name1" value="${selectoption1}" type="text"/>
	    					商品二级分类<input class="ui_input_txt02" name="name2" id="name2" value="${selectoption2}" type="text"/>
						</div>
						<div id="box_bottom">
							<input class="ui_input_btn01" type="submit" value="查询"/>
						</div>
					</div>
				</div>
			</div>
			<div class="ui_content">
				<div class="ui_tb">
				    <table class="table" width="100%" align="center">
				    	<tr>
				    		<th>商品id</th>
				    		<th>商品名称</th>
				    		<th>商品原价</th>
				    		<th>商品单位</th>
				    		<th>操作</th>
				    	</tr>
				    	<c:forEach items="${products}" var="temp">
				    		<tr>
				    			<td>${temp.product_id}</td>
				    			<td>${temp.product_name}</td>
				    			<td>${temp.price}</td>
				    			<td>${temp.unit}</td>
				    			<td><button class="ui_input_btn01" onclick="form1.action='servlet/Newgoodsservlet?type=update&name1=&name2=&product_id=${temp.product_id}'">修改</button>&nbsp;&nbsp;&nbsp;
				    				<button class="ui_input_btn01" onclick="form1.action='servlet/Newgoodsservlet?type=delete&name1=&name2=&product_id=${temp.product_id}'">删除</button></td>
				    		</tr>
				   		</c:forEach>
	    			</table>
				</div>
			</div>
		</div> 
    </form>
  </body>
</html>
